<?php
namespace Api\Controller;
use Think\Controller;
class BaseController extends Controller {

    public function _initialize()
    {
        C('SHOW_PAGE_TRACE','');
    }




    function mb_unserialize($serial_str) {
        $serial_str= preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
        $serial_str= str_replace("\r", "", $serial_str);
        return unserialize($serial_str);
    }

// ascii
    function asc_unserialize($serial_str)
    {
        $serial_str = preg_replace('!s:(\d+):"(.*?)";!se', '"s:".strlen("$2").":\"$2\";"', $serial_str);
        $serial_str = str_replace("\r", "", $serial_str);
        return unserialize($serial_str);

    }
}
